import axios from '@/tools/index.js'

export function getBanner () {
  return axios.get('/banner')
}
export function getKind () {
  return axios.get('/pro/kind')
}
export function getPage (ops) {
  return axios.get('/pro/page', {
    params: ops
  })
}
export function getDetail (ops) {
  return axios.get('/pro/detail', {
    params: ops
  })
}
export function sendSms (ops) {
  return axios.get('/user/send', {
    params: ops
  })
}
export function register (ops) {
  return axios.post('/user/register', ops)
}
export function login (ops) {
  return axios.get('/user/login', {
    params: ops
  })
}
export function getUser (ops) {
  return axios.get('/user/msg', {
    params: ops
  })
}
export function addCart (ops) {
  return axios.post('/cart/add', ops)
}
export function getCart (ops) {
  return axios.get('/cart', {
    params: ops
  })
}
export function setFlag (ops) {
  return axios.post('/cart/flag', ops)
}
export function setAllFlag (ops) {
  return axios.post('/cart/allFlag', ops)
}
export function setNum (ops) {
  return axios.post('/cart/num', ops)
}
export function delCart (ops) {
  return axios.post('/cart/del', ops)
}
export function addOrder (ops) {
  return axios.post('/order/add', ops)
}
export function getOrder (ops) {
  return axios.get('/order', {
    params: ops
  })
}
export function pay (ops) {
  return axios.get('/order/pay', {
    params: ops
  })
}
export function getHistorySearch (ops) {
  return axios.get('/search', {
    params: ops
  })
}
export function addHistorySearch (ops) {
  return axios.post('/search/add', ops)
}
export function delHistorySearch (ops) {
  return axios.post('/search/del', ops)
}
